<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
	var str = 'a-b-5-cd';

	var arr = str.split('-');		//以'-'为标记，拆分字符串并组成数组
	alert(arr);						//a,b,5,cd。以'-'为标记，拆分字符串并组成数组[a,b,5,cd]
	alert(arr[1])					//b
	</script>
</head>
<body>
	
</body>
</html>